package com.xing.demo;

import java.util.Scanner;

public class for循环五名同学平均分 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        
        int sum=0;
        for (int i = 0; i < 5; i++) {
            System.out.println("请输入第"+(i+1)+"个同学成绩");
            int score = input.nextInt();
            sum+=score;
        }
        double avg =(double) sum / 5;
        System.out.println("平均分是："+avg);
    }
}
